#pragma once
/*--------------------------------------------------------------------------------
 * Adaptive Intelligence - Foundation Framework Class Library
 * Version 2.00
 * 
 * Linger Structure
 *      Maintains information about a specific socket that specifies how that socket 
 * should behave when data is queued to be sent and the closesocket function is 
 * called on the socket.
 *------------------------------------------------------------------------------*/

/*--------------------------------------------------------------------------------
 * System Imports
 *------------------------------------------------------------------------------*/
#include "stdafx.h"

using namespace System;
using namespace System::Runtime;
using namespace System::Runtime::InteropServices;
using namespace System::Net;
using namespace System::Net::Sockets;

namespace Adaptive
{
	namespace Network
	{
		namespace Sockets
		{
			/// <summary>
			/// Maintains information about a specific socket that specifies how that socket 
			/// should behave when data is queued to be sent and the closesocket function is 
			/// called on the socket.
			/// </summary>
			public value struct Linger
			{
			public:
				/// <summary>
				/// Specifies whether a socket should remain open for a specified amount of time 
				/// after a closesocket function call to enable queued data to be sent.
				/// </summary>
				unsigned short OnOff;
				/// <summary>
				/// The linger time in seconds. This member specifies how long to remain open after 
				/// a closesocket function call to enable queued data to be sent.
				/// </summary>
				unsigned short LingerTime;
			};
		}
	}
}
